<%-- 
    Document   : ProfilAdmin
    Created on : 4 janv. 2012, 17:37:58
    Author     : Gaëtan
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>

<div class="cssProfilAdmin">
    <h1 id="header"><s:property value="titleEditPage" /></h1>

    <s:if test="errorMessages.size()>0">
        <ul><s:actionerror/></ul>
    </s:if>
    <s:if test="actionMessages.size()>0">
        <ul><s:actionmessage/></ul>
    </s:if>
    <s:form method="post" action="validateEditProfil">
        <s:hidden name="titleEditPage" />
        <s:hidden name="user.id" />
        <s:hidden name="user.version" />
        <s:hidden name="user.login" />
        <s:hidden name="user.mdp" />
        <s:textfield name="user.nom" label="%{getText('user.nom')}%{getText('mandatory')}" value="%{user.nom}" />
        <s:textfield name="user.prenom" label="%{getText('user.prenom')}%{getText('mandatory')}" value="%{user.prenom}" />
        <s:textfield name="user.promo" label="%{getText('user.promo')}%{getText('mandatory')}" value="%{user.promo}" />
        <s:textfield name="user.mail" label="%{getText('user.mail')}%{getText('mandatory')}" value="%{user.mail}" />
        <s:if test="login!=null">
            <s:select name="typeid" label="%{getText('user.type')}" list="userTypes" listKey="id" listValue="libelle" value="%{user.type.id}"/>
        </s:if>
        <s:password name="mdp" label="%{getText('user.mdp')}"/>
        <s:password name="mdpvalidate" label="%{getText('user.mdpvalidate')}" />
        <s:checkbox name="user.subscribed" label="%{getText('user.subscribed')}" value="%{user.subscribed}"/>
        <s:submit value="%{getText('user.edit.submit')}" />
    </s:form>

</div>